package org.zfin.properties.ant;

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.tools.ant.Task;


/**
 *  Base task.
 */
public class PropertyFileTask extends Task {

    // new properties
    private String file;
    private String enumClass;
    private boolean override = true ;

    public String getFile() {
        return file;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public String getEnumClass() {
        return enumClass;
    }

    public void setEnumClass(String enumClass) {
        this.enumClass = enumClass;
    }

    public void setOverride(boolean override) {
        this.override = override;
    }

    public PropertiesConfiguration createPropertiesConfiguration() throws ConfigurationException {
        return new OverridePropertiesConfiguration(getFile(), override);
    }
}